<cfcomponent extends="queries">
        

    
    
    
    <!--- Insert Employee --->
    <cffunction name="funcUpdateStep2Employee" returntype="any">
    	<cfargument default="" name="FORM" required="yes" />
        
        <cfset retObj = {} />           
               
        <cfif ARGUMENTS.FORM.BadgePos EQ "">            
            <cfset GetNonSCFType = SUPER.funcGetNonSCFTypes(0, ARGUMENTS.FORM.NonSCFTypeID) />            
            <cfset ARGUMENTS.FORM.BadgePos = GetNonSCFType.Type />        	
        </cfif> 
        
        <cfset LOCALS.DateOfExpiration = dateformat(dateadd('m',2, (Month(ARGUMENTS.FORM.EstStartDate) & "/1/" & year(ARGUMENTS.FORM.EstStartDate))),'mm/dd/yyyy')>       
        
        <cfquery name="qryUpdateStep2Employee" datasource="#Session.DataSource#">
			<!---
			scf_UpdateEmployee #intEmpID#, '#strFirst#', '#strMI#', '#strLast#', '#strPref#', 
				NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
				NULL, #intMirrorAccountID#, NULL, #intSupID#, #intDeptID#, '#strDeskPhone#', NULL, '#strAccess#', NULL, NULL, 
				NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 
				NULL, NULL, NULL, NULL, '#strSSN#', NULL, NULL, NULL, NULL, '#dteAct#', NULL, #intContainerID#, #intNonSCFTypeID#, 
				'#strCompany#', '#dteDOX#', '#strBadgePos#', NULL, NULL, NULL, NULL, #bolAccount#, #bolBadge#  - Scott's old stored procedure
			--->
                    
            UPDATE 
            	Employee
            SET
            	First = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.First#" />,
                Middle = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.Middle#" />,
                Last = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.Last#" />,
                PreferredName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.PreferredName#" />,                
                MirrorAccountID = <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.FORM.MirrorAccountID#" />,
                SupervisorID = <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.FORM.SupervisorID#" />,
                DeptID = <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.FORM.DeptID#" />,
                DeskPhone = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.DeskPhone#" />,
                BadgeAccessLevelID = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.BadgeAccessLevelID#" />,
                ContainerID = <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.FORM.ContainerID#" />,
                NonSCFTypeID = <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.FORM.NonSCFTypeID#" />,
                CompanyName = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.CompanyName#" />,
                ExpDate = <cfqueryparam cfsqltype="cf_sql_date" value="#LOCALS.DateOfExpiration#" />,
                BadgePos = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.BadgePos#" />,
                SSN = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.SSN#" />,
                EstStartDate = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.FORM.EstStartDate#" />
                <cfif isDefined('ARGUMENTS.FORM.NA')>
                	,NonSCFNetworkAccount = <cfqueryparam cfsqltype="cf_sql_varchar" value="1" />
                </cfif>
                <cfif isDefined('ARGUMENTS.FORM.Badge')>
                	,NonSCFBadge = <cfqueryparam cfsqltype="cf_sql_varchar" value="1" />
                </cfif>                          
        	WHERE 
            	ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#ARGUMENTS.FORM.EmpID#" />         
        </cfquery>
        
        <cfset SUPER.funcUpdateAction(ARGUMENTS.FORM.StepID, Session.intUserRosettaID, replace(trim(ARGUMENTS.FORM.Comments),"'","''","all")) />
       
        <cfset retObj.NewStepID = SUPER.funcInsertAction(ARGUMENTS.FORM.EmpID, 4).NewStepID />
        
    	<cfreturn retObj />
    </cffunction>
    <!--- Insert Employee --->
    
    
    
    
       
</cfcomponent>